import React, { Component } from 'react';
import Swiper from "swiper"
import "swiper/css/swiper.css"
import './home_swiper.css';

class Home_swiper extends Component {
    state={
        banner:["http://www.zzpinfangwang.cn/file/upload/201903/01/234025471.jpg",
            "http://www.zzpinfangwang.cn/file/upload/201903/01/234117731.jpg"]
    }
        
    componentDidMount(){
        new Swiper("#swiper",{
            toop:true
        })
    }
   
    render() {
        return (
            <div>
                <div className="swiper-container homeSwiper-center" id="swiper">
                    <div className="swiper-wrapper">
                        {
                            this.state.banner.map((item,i)=><div key={i} className="swiper-slide home_swiper">
                                <img src={item}></img>
                            </div>)
                        }                    
                    </div>
                    
                </div>
            </div>
        );
    }
}

export default Home_swiper;